<?php
	$cs = Yii::app()->clientScript;
	$cs->registerCoreScript('jquery');
	$cs->registerScriptFile(BASE_URL . '/js/common.js', CClientScript::POS_END);
	$cs->registerScriptFile(BASE_URL . '/js/ycoe/common.js', CClientScript::POS_END);
	$cs->registerCssFile(BASE_URL . '/css/ycoe/common.css');
	
	//尝试包含当前页面样式及脚本
	$action_resource = $this->module->id . '/' . $this->id . '_' . $this->action->id;
	if(file_exists(ROOT_PATH . '/js/' . $action_resource . '.js')){
		$cs->registerScriptFile(BASE_URL . '/js/' . $action_resource . '.js', CClientScript::POS_END);
	}
	if(file_exists(ROOT_PATH . '/css/' . $action_resource . '.css')){
		$cs->registerCssFile(BASE_URL . '/css/' . $action_resource . '.css');
	}
	$links = array(
		'我的项目' 		=> '/ycoe/projects',
		'SEO'			=> '',
		'开发语言'		=> '',
		'数据库'			=> '',
		'精益创业/开发'	=> '',
		'市场/营销'		=> '',
		'运维'			=> '',
	);		
?>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="language" content="zh_cn" />
		<title><?php echo CHtml::encode($this->pageTitle); ?></title>
	</head>
	<body>
		<header id="site_header">
			<div class="wrap_1000">
				<h1><a href="/ycoe">YcoeXu</a></h1>
				<nav>
				<?php 
					foreach ($links as $text => $url){
						echo '<h2><a href="' . $url . '">' . $text . '</a></h2>';
					}
				?>
				</nav>
			</div>
		</header>
		<?php echo $content ?>
	</body>
</html>